#ANSI colors
BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = range(30, 38)
BOLD, NORMAL = 1, 22
def ansi(code):
	return '\x1B[%sm' % code
def colstr(code, str, finish = 0):
	return '%s%s%s' % (ansi(code), str, ansi(finish))
	
#message types
MSG_SYSTEM, MSG_SYS_INFO, MSG_SYS_EVENT, MSG_SYS_ERR, MSG_CHAT, MSG_EMOTE, MSG_GAME_INFO, MSG_GAME_EVENT, MSG_GAME_ERR, MSG_GAME_ATTACK = range(0, 10)